home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
3006
/
3006.xpi
/
chrome
/
dwhelper.jar
/
content
/
twitter-message.xul
< prev
next >
Wrap
Extensible Markup Language
|
2010-01-15
|
2KB
|
58 lines
<?xml version="1.0"?>
<!-- *****************************************************************************
* Copyright (c) 2006-2009 Michel Gutierrez. All Rights Reserved.
****************************************************************************** -->
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://dwhelper/content/bindings.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://dwhelper/locale/dwhelper.dtd" >
<dialog id="dwhelper-twitter-message"
title="&twitter.title.send-message;"
flex="1"
onload="onLoad()"
ondialogaccept="return onOk()"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
buttons="cancel,accept">
<html:style>
</html:style>
<script><![CDATA[
var Util=Components.classes["@downloadhelper.net/util-service;1"]
.getService(Components.interfaces.dhIUtilService);
function onLoad() {
var data=window.arguments[0];
var tm=document.getElementById("twitter-message");
tm.value=data.message;
tm.user=data.user;
tm.smartNaming=data.smartnaming;
windows.sizeToContent();
}
function onOk() {
var data=window.arguments[0];
var tm=document.getElementById("twitter-message");
if(tm.value.indexOf(data.url)<0) {
Util.alertError(Util.getText("twitter.message.url-not-found"));
return false;
}
var twitter=Components.classes['@downloadhelper.net/twitter-processor;1'].
getService(Components.interfaces.dhITwitter);
if(twitter.twitterLength(tm.value)>140) {
Util.alertError(Util.getText("twitter.message.too-long"));
return false;
}
twitter.update(tm.value);
return true;
}
]]>
</script>
<TwitterMessage id="twitter-message" flex="1"/>
</dialog>